
import Layout from '../layouts/MainLayout.vue'

const routes = [
  // 主页1
  {
    path: '/home/',
    redirect: '/dashboardFirst',
    component: Layout,
    children: [
      { path: 'dashboardFirst', component: () => import('pages/dashboardFirst.vue') }
      // { path: 'dashboardFirst', component: () => import('pages/Dashboard.vue') }
    ]
  },
  // 主页2
  {
    path: '/home/',

    component: Layout,
    children: [
      { path: 'dashboard2', component: () => import('pages/Dashboard2.vue') }
    ]
  },
  // 登录
  // {
  //   path: '/',
  //   component: Layout,
  //   children: [
  //     { path: 'login', component: () => import('pages/login.vue') }
  //   ]
  // },
  {
    path: '/', component: () => import('pages/login.vue')
  },

  //木箱订单新增
  {
    path: '/home/PurchaseOrder',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('pages/PurchaseOrder/insertPurchaseOrder-树状折叠.vue') },
      { path: 'insert2', component: () => import('src/pages/PurchaseOrder/insertPurchaseOrder2.vue') },
      { path: 'edit', component: () => import('src/pages/PurchaseOrder/editPurchaseOrder.vue') },
      { path: 'sendback', component: () => import('src/pages/PurchaseOrder/sendbackPurchaseOrder.vue') },
      { path: 'report', component: () => import('pages/PurchaseOrder/reportPurchaseOrder.vue') }
    ]
  },
  //木箱入库
  {
    path: '/home/InStock',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('src/pages/InStock/insertInStock.vue') },
      { path: 'edit', component: () => import('src/pages/InStock/editInStock.vue') },
      { path: 'sendback', component: () => import('src/pages/InStock/sendbackInStock.vue') },
      { path: 'report', component: () => import('src/pages/InStock/reportInStock.vue') }
    ]
  },

  //领用申请    OutStockApply
  {
    path: '/home/OutStockApply',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('src/pages/OutStockApply/insertOutStockApply.vue') },
      { path: 'edit', component: () => import('src/pages/OutStockApply/editOutStockApply.vue') },
      { path: 'sendback', component: () => import('src/pages/OutStockApply/sendbackOutStockApply.vue') },
      { path: 'report', component: () => import('src/pages/OutStockApply/reportOutStockApply.vue') }
    ]
  },

  //领用出库 OutStock
  {
    path: '/home/OutStock',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('src/pages/OutStock/insertOutStock.vue') },
      { path: 'edit', component: () => import('src/pages/OutStock/editOutStock.vue') },
      { path: 'sendback', component: () => import('src/pages/OutStock/sendbackOutStock.vue') },
      { path: 'report', component: () => import('src/pages/OutStock/reportOutStock.vue') }
    ]
  },
  //  库存调整  StockCountLoss
  {
    path: '/home/StockCountLoss',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('src/pages/StockCountLoss/insertStockCountLoss.vue') },
      { path: 'edit', component: () => import('src/pages/StockCountLoss/editStockCountLoss.vue') },
      { path: 'report', component: () => import('src/pages/StockCountLoss/reportStockCountLoss.vue') }
    ]
  },
  //  报价管理 SupplierPrice
  {
    path: '/home/SupplierPrice',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('pages/SupplierPrice/insertSupplierPrice.vue') },
      { path: 'edit', component: () => import('pages/SupplierPrice/editSupplierPrice.vue') },
      { path: 'report', component: () => import('pages/SupplierPrice/reportSupplierPrice.vue') }
    ]
  },

  // 结算管理  ReconciliationBill
  //  折让单       Discount
  {
    path: '/home/ReconciliationBill',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('src/pages/ReconciliationBill/insertReconciliationBill.vue') },
      { path: 'edit', component: () => import('src/pages/ReconciliationBill/editReconciliationBill.vue') },
      { path: 'report', component: () => import('src/pages/ReconciliationBill/reportReconciliationBill.vue') }
    ]
  },
  // 结算管理  ReconciliationBill
  //  折让单       Discount
  {
    path: '/home/Vendor',
    component: Layout,
    children: [
      { path: 'insert', component: () => import('src/pages/Vendor/insertVendor.vue') },
      { path: 'edit', component: () => import('src/pages/Vendor/editVendor.vue') },
      { path: 'report', component: () => import('src/pages/Vendor/reportVendor.vue') }
    ]
  },
  // 权限管理
  {
    path: '/home/',
    component: Layout,
    children: [
      { path: 'permission', component: () => import('pages/permission.vue') }
    ]
  },


  //测试1
  {
    path: '/home/',
    component: Layout,
    children: [
      { path: 'test_a', component: () => import('src/pages/MyTest/test_a.vue') },
      { path: 'test_b', component: () => import('src/pages/MyTest/test_b.vue') },
      { path: 'test_c', component: () => import('src/pages/MyTest/test_c.vue') },
      { path: 'test_d', component: () => import('src/pages/MyTest/test_d.vue') },
      { path: 'test_e', component: () => import('src/pages/MyTest/test_e.vue') },
      { path: 'test_f', component: () => import('src/pages/MyTest/Tables.vue') },
    ]
  },


  //help
  {
    path: '/home/Help',
    component: Layout,
    children: [
      { path: 'help_UI', component: () => import('src/pages/HELP/help_UI.vue') },
      { path: 'help_Server', component: () => import('src/pages/HELP/help_Server.vue') },
      { path: 'help_SQL', component: () => import('src/pages/HELP/help_SQL.vue') }
    ]
  },


  {
    path: '/home/:catchAll(.*)*',
    component: () => import('pages/ErrorNotFound.vue')
  }
]

export default routes
